import request from '../../utils/request'

export function requestBrandlist () {
    return new Promise((resolve) => {
        request.get('/brand/getAll').then(res => {
            resolve(res.data)
        })
    })
}

export function requestAddBrandList (banner) {
    return new Promise(resolve => {
        request.post('/brand/add', {
            banner,
        }).then(res => {
            resolve(res.data)
        })
    })
}

export function requestEditBrandList (brand, newval) {
    return new Promise(resolve => {
        request.post('/brand/edit', {
            brand,
            newval
        }).then(res => {
            resolve(res.data)
        })
    })
}

export function requestRemoveBrandList (banner) {
    return new Promise(resolve => {
        request.post('/brand/remove', {
            banner
        }).then(res => {
            resolve(res.data)
        })
    })
}
